<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .modal{
            position: fixed;
            top: 50%;
            left: 50%;
            width: 500px;
            height: 500px;
            margin: -250px 0 0 -250px;
            box-shadow: 1px 3px 5px #888;
        }
        .modal header{
            height: 50px;
            background-color: #ccc;
            color: #fff;
            padding: 0 15px;
            box-sizing: border-box;
            font-size: 16px;
            line-height: 50px;   
        }
        .modal.success header {
            background-color: green;
        }
        .modal.warning header {
            background-color: orange;
        }
        .modal.danger header {
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="wrap">
        <div class="modal">
            <header>Modal</header>
        </div>
        <div class="btns">
            <button data-status="success">成功</button>
            <button data-status="warning">警告</button>
            <button data-status="danger">失败</button>
        </div>
    </div>
    <script  type="module" src="http://localhost:7777/factory/index.js"></script>
</body>
</html>